package cn.edu.dlmu.cogo;

import cn.edu.dlmu.cogo.framework.CogoStarter;
import cn.edu.dlmu.cogo.framework.annotation.CogoApplication;
import cn.edu.dlmu.cogo.framework.context.ApplicationContext;
import cn.edu.dlmu.cogo.framework.context.ContextContainer;
import cn.edu.dlmu.cogo.register.EnableRegisterServer;
import cn.edu.dlmu.cogo.register.RegisterConfig;

/**
 * @author hongda.li@hand-china.com 2022/3/13 16:26
 */
@EnableRegisterServer
@CogoApplication
public class RegisterServerApplication {

    public static void main(String[] args) {
        configRegister();
        CogoStarter.run(RegisterServerApplication.class);
    }

    private static void configRegister(){
        RegisterConfig registerConfig = new RegisterConfig();
        registerConfig.setServiceName("demo-register-server");
        ApplicationContext context = ContextContainer.getApplicationContext();
        context.setBean(registerConfig);
    }
}
